//自定义插件
import Vue from 'vue';
import {
    Scrollbar,
    Empty,
    Dialog,
    Dropdown,
    DropdownMenu,
    DropdownItem,
    Menu,
    Submenu,
    MenuItem,
    Input,
    Select,
    Option,
    Button,
    Table,
    TableColumn,
    DatePicker,
    TimeSelect,
    TimePicker,

    Breadcrumb,
    BreadcrumbItem,
    Form,
    FormItem,

    Slider,
    Icon,
    Row,
    Col,
    Upload,

    Card,


    Loading,
    MessageBox,
    Message,
    Notification
} from 'element-ui';

Vue.use(Dialog);
Vue.use(Scrollbar);
Vue.use(Dropdown);
Vue.use(DropdownMenu);
Vue.use(DropdownItem);
Vue.use(Menu);
Vue.use(MenuItem);
Vue.use(Submenu);
Vue.use(Empty);
Vue.use(Select);
Vue.use(Option)
Vue.use(Input);
Vue.use(Button);
Vue.use(Table);
Vue.use(TableColumn);
Vue.use(DatePicker);
Vue.use(TimeSelect);
Vue.use(TimePicker);
Vue.use(Breadcrumb);
Vue.use(BreadcrumbItem);
Vue.use(Form);
Vue.use(FormItem);
Vue.use(Slider);
Vue.use(Icon);
Vue.use(Row);
Vue.use(Col);
Vue.use(Upload);
Vue.use(Card);

Vue.use(Loading.directive);

Vue.prototype.$confirm = MessageBox.confirm;
Vue.prototype.$message = Message;
Vue.prototype.$MsgBox = MessageBox;
Vue.prototype.$notify = Notification;
export const plugin={
    install(vue){
        vue.directive('focus', {
            inserted: function(el) {
              el.querySelector('input').focus();
            }
          });
    }
}
